package com.glela.platform.vo;

import com.glela.common.constant.GenderEnum;
import com.glela.platform.model.response.ResponseMineInfo;
import com.glela.platform.model.response.ResponsePersonalInfoset;

/**用户基本信息
 * @author liujie
 *
 */
public class UserBasicInfo {
	private String nickName;
	private String tele;
	private int gender;
	private String headPortrait;
	//点赞
	private int likeNum;
	//关注数
 	private int attentionNum;
	public String getNickName() {
		return nickName;
	}
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	public String getTele() {
		return tele;
	}
	public void setTele(String tele) {
		this.tele = tele;
	}
	public int getGender() {
		return gender;
	}
	public void setGender(int gender) {
		this.gender = gender;
	}
	public String getHeadPortrait() {
		return headPortrait;
	}
	public void setHeadPortrait(String headPortrait) {
		this.headPortrait = headPortrait;
	}
	public int getLikeNum() {
		return likeNum;
	}
	public void setLikeNum(int likeNum) {
		this.likeNum = likeNum;
	}
	public int getAttentionNum() {
		return attentionNum;
	}
	public void setAttentionNum(int attentionNum) {
		this.attentionNum = attentionNum;
	}
 	
	public void personalInfo2BasicInfo(ResponsePersonalInfoset personalInfo){
		if(personalInfo != null){
			setGender(GenderEnum.getGenderByDesc(personalInfo.getSex()));
	 		setHeadPortrait(personalInfo.getPicture());
			setTele(personalInfo.getMobilePhone());
			setNickName(personalInfo.getNickName());
		}
  	}
	
	public void mineInfo2BasicInfo(ResponseMineInfo personalInfo){
		if(personalInfo != null){
			setAttentionNum(personalInfo.getFocusOn());
			setLikeNum(personalInfo.getThumbUpVideo());
		}
 	}
 }
